\usepackage[cp1250]{inputenc} % milovnici win kodovani, necht laskave zameni latin2 za cp1250
%\usepackage{czech}
\usepackage{a4wide} % evropsky format
%\usepackage{index} % nutno pouzit v pripade tvorby rejstriku balickem makeindex
%\usepackage{fancybox} % umoznuje pokrocile rameckovani :-)
%\usepackage[pdftex]{graphicx} % nezbytne pro vkladani obrazku do dokumentu
\usepackage{graphicx} % nezbytne pro vkladani obrazku do dokumentu


\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[left=3.5cm]{geometry}

\usepackage{pifont}


\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{listings}
\usepackage{setspace}
\usepackage{color}
\usepackage{subfig}
\usepackage{wasysym}

\usepackage{ifpdf}
\usepackage{url}
\usepackage{algorithmic}
\usepackage{algorithm}
\numberwithin{algorithm}{chapter}

%\floatname{algorithm}{Procedure}

\usepackage{alltt}
\usepackage{lscape}


\newcommand{\theHalgorithm}{\arabic{algorithm}}

\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\xmlfrag}[1]{\begin{alltt}#1\end{alltt}
}


\newcommand{\link}[1]{\url{#1}}


\newcommand{\rarrow}{\ding{213} } 


\newcommand{\diagram}[1]{\geturi{Implementation/Documents/Diagrams/#1}}


\newcounter{todocounter}
\setcounter{todocounter}{1}

\newcommand{\todo}[1]{%\addcontentsline{toc}{subsection}{\textcolor{red}{TODO \arabic{todocounter}: #1}}
\footnote{\{\textcolor{red}{\textbf{TODO \arabic{todocounter}: #1 } }\}}
\addtocounter{todocounter}{1}
}

\ifpdf

%\usepackage[pdftex,bookmarks=true,hyperindex=false,colorlinks=false,linktocpage=true]{hyperref}
%
%\hypersetup{
%	bookmarksnumbered,
%	pdfstartview={FitH}	
%}

\fi




\makeatletter
\newbox\sf@box
\newenvironment{SubFloat}[2][]%
{\def\sf@one{#1}%
\def\sf@two{#2}%
\setbox\sf@box\hbox
\bgroup}%
{ \egroup
\ifx\@empty\sf@two\@empty\relax
\def\sf@two{\@empty}
\fi
\ifx\@empty\sf@one\@empty\relax
\subfloat[\sf@two]{\box\sf@box}%
\else
\subfloat[\sf@one][\sf@two]{\box\sf@box}%
\fi}
\makeatother